# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Customer do
  @moduledoc """
  A customer.

  ## Attributes

  *   `accountStatus` (*type:* `String.t`, *default:* `nil`) - Output only. Account status, for example, Enabled, Paused, Removed, etc.
  *   `accountType` (*type:* `String.t`, *default:* `nil`) - Output only. Engine account type, for example, Google Ads, Microsoft Advertising, Yahoo Japan, Baidu, Facebook, Engine Track, etc.
  *   `autoTaggingEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether auto-tagging is enabled for the customer.
  *   `conversionTrackingSetting` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ConversionTrackingSetting.t`, *default:* `nil`) - Output only. Conversion tracking setting for a customer.
  *   `creationTime` (*type:* `String.t`, *default:* `nil`) - Output only. The timestamp when this customer was created. The timestamp is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss" format.
  *   `currencyCode` (*type:* `String.t`, *default:* `nil`) - Immutable. The currency in which the account operates. A subset of the currency codes from the ISO 4217 standard is supported.
  *   `descriptiveName` (*type:* `String.t`, *default:* `nil`) - Optional, non-unique descriptive name of the customer.
  *   `doubleClickCampaignManagerSetting` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_DoubleClickCampaignManagerSetting.t`, *default:* `nil`) - Output only. DoubleClick Campaign Manager (DCM) setting for a manager customer.
  *   `engineId` (*type:* `String.t`, *default:* `nil`) - Output only. ID of the account in the external engine account.
  *   `finalUrlSuffix` (*type:* `String.t`, *default:* `nil`) - The URL template for appending params to the final URL.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the customer.
  *   `lastModifiedTime` (*type:* `String.t`, *default:* `nil`) - Output only. The datetime when this customer was last modified. The datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
  *   `manager` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the customer is a manager.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the customer. Customer resource names have the form: `customers/{customer_id}`
  *   `status` (*type:* `String.t`, *default:* `nil`) - Output only. The status of the customer.
  *   `timeZone` (*type:* `String.t`, *default:* `nil`) - Immutable. The local timezone ID of the customer.
  *   `trackingUrlTemplate` (*type:* `String.t`, *default:* `nil`) - The URL template for constructing a tracking URL out of parameters.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accountStatus => String.t() | nil,
          :accountType => String.t() | nil,
          :autoTaggingEnabled => boolean() | nil,
          :conversionTrackingSetting =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ConversionTrackingSetting.t()
            | nil,
          :creationTime => String.t() | nil,
          :currencyCode => String.t() | nil,
          :descriptiveName => String.t() | nil,
          :doubleClickCampaignManagerSetting =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_DoubleClickCampaignManagerSetting.t()
            | nil,
          :engineId => String.t() | nil,
          :finalUrlSuffix => String.t() | nil,
          :id => String.t() | nil,
          :lastModifiedTime => String.t() | nil,
          :manager => boolean() | nil,
          :resourceName => String.t() | nil,
          :status => String.t() | nil,
          :timeZone => String.t() | nil,
          :trackingUrlTemplate => String.t() | nil
        }

  field(:accountStatus)
  field(:accountType)
  field(:autoTaggingEnabled)

  field(:conversionTrackingSetting,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ConversionTrackingSetting
  )

  field(:creationTime)
  field(:currencyCode)
  field(:descriptiveName)

  field(:doubleClickCampaignManagerSetting,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_DoubleClickCampaignManagerSetting
  )

  field(:engineId)
  field(:finalUrlSuffix)
  field(:id)
  field(:lastModifiedTime)
  field(:manager)
  field(:resourceName)
  field(:status)
  field(:timeZone)
  field(:trackingUrlTemplate)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Customer do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Customer.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Customer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
